//
//  GNRCommonPicker.h
//  GNRPickCard_Example
//
//  Created by LvYuan on 2017/10/31.
//  Copyright © 2017年 ly918@qq.com. All rights reserved.
//

#import <GNRPickCard/GNRPickCard.h>

#import "GNRSelectionItemProtocol.h"
#import "GNRTextInputProtocol.h"

#import "GNRSelectionCardView.h"
#import "GNRBaojiaFooterView.h"
#import "GNRInputCardView.h"

@class GNRCommonPicker;

typedef void(^GNRCommonPickerSelectItemBlock)(id<GNRSelectionItemProtocol>item,GNRCommonPicker *picker);//选择了一个选项
typedef void(^GNRCommonPickerActionBlock)(id result,GNRCommonPicker *picker);//点击了确认按钮

@interface GNRCommonPicker : GNRPickCard
@property (nonatomic, copy)NSString *showTitle;
@property (nonatomic, strong)UIView *contentView;
@property (nonatomic, strong)id contentDataSource;

- (GNRCommonPicker *)initWithContentView:(UIView *)contentView;

+ (GNRCommonPicker *)pickerWithContentView:(UIView *)contentView;

//保价服务
+ (GNRCommonPicker *)pickerForBaojiaWithItems:(NSMutableArray <id<GNRSelectionItemProtocol>>*)items
                              selectItemBlock:(GNRCommonPickerSelectItemBlock)selectItemBlock
                                  actionBlock:(GNRCommonPickerActionBlock)actionBlock
                           footerPressedBlock:(void (^)(GNRBaojiaFooterView *baojiaFooter,GNRPickCard *pickCard))footerPressedBlock;

//配送工具
+ (GNRCommonPicker *)pickerForTransportWithItems:(NSMutableArray <id<GNRSelectionItemProtocol>>*)items
                                selectItemBlock:(GNRCommonPickerSelectItemBlock)selectItemBlock
                                    actionBlock:(GNRCommonPickerActionBlock)actionBlock;

//物品重量
+ (GNRCommonPicker *)pickerForGoodsWeightWithItems:(NSMutableArray <id<GNRSelectionItemProtocol>>*)items
                                 selectItemBlock:(GNRCommonPickerSelectItemBlock)selectItemBlock
                                     actionBlock:(GNRCommonPickerActionBlock)actionBlock;

//文本输入
+ (GNRCommonPicker *)pickerForInputConfig:(id<GNRTextInputProtocol>)inputConfig
                                       actionBlock:(GNRCommonPickerActionBlock)actionBlock;


@end

